<?php
class App_Form_Blog_AddQuestion extends App_Form_Abstract
{
	public function init()
    {
    	$this->setMethod('post');
    	$this->setAction('/blog/post');

        $this->addElement('text', 'sender_email', array(
            'required'      => true,
            'label'         => '发信人：',
            'title'         => '发信人邮箱',
            'filters'       => array('StringTrim'),
            'validators'    => array('EmailAddress'),
        ));

        $this->addElement('text', 'praised_name', array(
            'required'      => true,
            'label'         => '被表扬人昵称：',
            'title'         => '被表扬人昵称',
            'filters'       => array('StringTrim'),
        ));

        $this->addElement('text', 'praised_email', array(
            'required'      => false,
            'label'         => '被表扬人：',
            'title'         => '被表扬人邮箱',
            'filters'       => array('StringTrim'),
            'validators'    => array('EmailAddress'),
        ));

    	// title
        /*
        $this->addElement('text', 'title', array(
            'required'      => false,
            'label'         => '标题：',
            'title'         => '表扬信的标题',
            //'title'         => 'Please enter the title',
            'style'         => 'width:400px;',
            'filters'       => array('StringTrim', 'StripTags')
        ));*/

        // text
        $this->addElement('textarea', 'text', array(
            'required'      => true,
            'label'         => '内容：',
            'title'         => '表扬信的内容',
            //'title'         => 'Please enter the post',
            'style'         => 'width:100%; height:200px;',
            //'filters'       => array('StripTags')
        ));

        $this->addElement('text', 'receiver_email', array(
            'required'      => true,
            'label'         => '收信人：',
            'title'         => '收信人邮箱',
            'filters'       => array('StringTrim'),
            'validators'    => array('EmailAddress'),
        ));

    }
}